/**
 * @author Justin Akin
 * @version Action Pals Core Library 0.1.0
 */
package com.actionpals.components.controls
{
	
	import flash.media.Video;
	import flash.media.Camera;
	import flash.net.NetStream;
	import com.actionpals.base.BaseSprite;

	public class SimpleVideo extends BaseSprite
	{
		
	//--------------------------------------------------------------------------------
	//
	//	Protected Member Variables
	//
	//--------------------------------------------------------------------------------
		
		protected var _video:Video;
		
	//--------------------------------------------------------------------------------
	//
	//	Constructor
	//
	//--------------------------------------------------------------------------------
		
		/**
		 * Constructor
		 */
		public function SimpleVideo( width:int = 320, height:int = 240 )
		{
			super();
			init( width, height );
		}
		
	//--------------------------------------------------------------------------------
	//
	//	Public Methods
	//
	//--------------------------------------------------------------------------------
	
		public function attachCamera( camera:Camera ):void{
			_video.attachCamera( camera );
		}
		
		public function attachNetStream( netStream:NetStream ):void{
			_video.attachNetStream( netStream );
		}
		
	//--------------------------------------------------------------------------------
	//
	//	Getters and Setters
	//
	//--------------------------------------------------------------------------------
		 
		public function getHeight():int
		{
			return _video.height;
		}
		
		public function setHeight( num:int ):void
		{
			_video.height = num;
		}
		
		public function getWidth():int
		{
			return _video.width;
		}
		
		public function setWidth( num:int ):void
		{
			_video.width = num;
		}
		
		public function get deblocking():int
		{
			return _video.deblocking;
		}
		
		public function set deblocking( num:int ):void
		{
			_video.deblocking = num;
		}
		
		public function get smoothing():Boolean
		{
			return _video.smoothing;
		}
		
		public function set smoothing( val:Boolean ):void
		{
			_video.smoothing = val;
		}
		
		public function get videoHeight():int
		{
			return _video.videoHeight;
		}
		
		public function get videoWidth():int{
			return _video.videoWidth;
		}
		
	//--------------------------------------------------------------------------------
	//
	//	Protected Methods
	//
	//--------------------------------------------------------------------------------
		
		protected function init( width:int, height:int ):void
		{	
			_video = addChild( new Video( width, height ) ) as Video;	
		}
		
	}
	
}